<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Struct template regex_iterator</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../xpressive/reference.html#header.boost.xpressive.regex_iterator_hpp" title="Header &lt;boost/xpressive/regex_iterator.hpp&gt;">
<link rel="prev" href="../../BOOST_XPR_ENSURE_.html" title="Macro BOOST_XPR_ENSURE_">
<link rel="next" href="mark_tag.html" title="Struct mark_tag">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../BOOST_XPR_ENSURE_.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../xpressive/reference.html#header.boost.xpressive.regex_iterator_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mark_tag.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.xpressive.regex_iterator"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct template regex_iterator</span></h2>
<p>boost::xpressive::regex_iterator</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../xpressive/reference.html#header.boost.xpressive.regex_iterator_hpp" title="Header &lt;boost/xpressive/regex_iterator.hpp&gt;">boost/xpressive/regex_iterator.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> BidiIter<span class="special">&gt;</span> 
<span class="keyword">struct</span> <a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a> <span class="special">{</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <a class="link" href="basic_regex.html" title="Struct template basic_regex">basic_regex</a><span class="special">&lt;</span> <span class="identifier">BidiIter</span> <span class="special">&gt;</span>               <a name="boost.xpressive.regex_iterator.regex_type"></a><span class="identifier">regex_type</span><span class="special">;</span>       
  <span class="keyword">typedef</span> <a class="link" href="match_results.html" title="Struct template match_results">match_results</a><span class="special">&lt;</span> <span class="identifier">BidiIter</span> <span class="special">&gt;</span>             <a name="boost.xpressive.regex_iterator.value_type"></a><span class="identifier">value_type</span><span class="special">;</span>       
  <span class="keyword">typedef</span> <span class="identifier">iterator_difference</span><span class="special">&lt;</span> <span class="identifier">BidiIter</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span> <a name="boost.xpressive.regex_iterator.difference_type"></a><span class="identifier">difference_type</span><span class="special">;</span>  
  <span class="keyword">typedef</span> <a class="link" href="regex_iterator.html#boost.xpressive.regex_iterator.value_type">value_type</a> <span class="keyword">const</span> <span class="special">*</span>                    <a name="boost.xpressive.regex_iterator.pointer"></a><span class="identifier">pointer</span><span class="special">;</span>          
  <span class="keyword">typedef</span> <a class="link" href="regex_iterator.html#boost.xpressive.regex_iterator.value_type">value_type</a> <span class="keyword">const</span> <span class="special">&amp;</span>                    <a name="boost.xpressive.regex_iterator.reference"></a><span class="identifier">reference</span><span class="special">;</span>        
  <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">forward_iterator_tag</span>             <a name="boost.xpressive.regex_iterator.iterator_category"></a><span class="identifier">iterator_category</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="regex_iterator.html#boost.xpressive.regex_iteratorconstruct-copy-destruct">construct/copy/destruct</a></span>
  <a class="link" href="regex_iterator.html#idp115155760-bb"><span class="identifier">regex_iterator</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="regex_iterator.html#idp115155824-bb"><span class="identifier">regex_iterator</span></a><span class="special">(</span><span class="identifier">BidiIter</span><span class="special">,</span> <span class="identifier">BidiIter</span><span class="special">,</span> <a class="link" href="basic_regex.html" title="Struct template basic_regex">basic_regex</a><span class="special">&lt;</span> <span class="identifier">BidiIter</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">,</span> 
                 <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> LetExpr<span class="special">&gt;</span> 
    <a class="link" href="regex_iterator.html#idp115157584-bb"><span class="identifier">regex_iterator</span></a><span class="special">(</span><span class="identifier">BidiIter</span><span class="special">,</span> <span class="identifier">BidiIter</span><span class="special">,</span> <a class="link" href="basic_regex.html" title="Struct template basic_regex">basic_regex</a><span class="special">&lt;</span> <span class="identifier">BidiIter</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">,</span> 
                   <span class="emphasis"><em><span class="identifier">unspecified</span></em></span><span class="special">,</span> 
                   <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="regex_iterator.html#idp115160160-bb"><span class="identifier">regex_iterator</span></a><span class="special">(</span><a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a><span class="special">&lt;</span> <span class="identifier">BidiIter</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  regex_iterator&amp; <a class="link" href="regex_iterator.html#idp115160720-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a><span class="special">&lt;</span> <span class="identifier">BidiIter</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="regex_iterator.html#idp115149136-bb">public member functions</a></span>
  <a class="link" href="regex_iterator.html#boost.xpressive.regex_iterator.value_type">value_type</a> <span class="keyword">const</span> <span class="special">&amp;</span> <a class="link" href="regex_iterator.html#idp115149344-bb"><span class="keyword">operator</span><span class="special">*</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <a class="link" href="regex_iterator.html#boost.xpressive.regex_iterator.value_type">value_type</a> <span class="keyword">const</span> <span class="special">*</span> <a class="link" href="regex_iterator.html#idp115149952-bb"><span class="keyword">operator</span><span class="special">-&gt;</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a><span class="special">&lt;</span> <span class="identifier">BidiIter</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <a class="link" href="regex_iterator.html#idp115150560-bb"><span class="keyword">operator</span><span class="special">++</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a><span class="special">&lt;</span> <span class="identifier">BidiIter</span> <span class="special">&gt;</span> <a class="link" href="regex_iterator.html#idp115154816-bb"><span class="keyword">operator</span><span class="special">++</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idp206903824"></a><h2>Description</h2>
<div class="refsect2">
<a name="idp206904032"></a><h3>
<a name="boost.xpressive.regex_iteratorconstruct-copy-destruct"></a><code class="computeroutput">regex_iterator</code> 
        public
       construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><a name="idp115155760-bb"></a><span class="identifier">regex_iterator</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><a name="idp115155824-bb"></a><span class="identifier">regex_iterator</span><span class="special">(</span><span class="identifier">BidiIter</span> begin<span class="special">,</span> <span class="identifier">BidiIter</span> end<span class="special">,</span> 
               <a class="link" href="basic_regex.html" title="Struct template basic_regex">basic_regex</a><span class="special">&lt;</span> <span class="identifier">BidiIter</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span> rex<span class="special">,</span> 
               <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> flags <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> LetExpr<span class="special">&gt;</span> 
  <a name="idp115157584-bb"></a><span class="identifier">regex_iterator</span><span class="special">(</span><span class="identifier">BidiIter</span> begin<span class="special">,</span> <span class="identifier">BidiIter</span> end<span class="special">,</span> 
                 <a class="link" href="basic_regex.html" title="Struct template basic_regex">basic_regex</a><span class="special">&lt;</span> <span class="identifier">BidiIter</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span> rex<span class="special">,</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> args<span class="special">,</span> 
                 <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> flags <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><a name="idp115160160-bb"></a><span class="identifier">regex_iterator</span><span class="special">(</span><a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a><span class="special">&lt;</span> <span class="identifier">BidiIter</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span> that<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout">regex_iterator&amp; <a name="idp115160720-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a><span class="special">&lt;</span> <span class="identifier">BidiIter</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span> that<span class="special">)</span><span class="special">;</span></pre></li>
</ol></div>
</div>
<div class="refsect2">
<a name="idp206931840"></a><h3>
<a name="idp115149136-bb"></a><code class="computeroutput">regex_iterator</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><a class="link" href="regex_iterator.html#boost.xpressive.regex_iterator.value_type">value_type</a> <span class="keyword">const</span> <span class="special">&amp;</span> <a name="idp115149344-bb"></a><span class="keyword">operator</span><span class="special">*</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><a class="link" href="regex_iterator.html#boost.xpressive.regex_iterator.value_type">value_type</a> <span class="keyword">const</span> <span class="special">*</span> <a name="idp115149952-bb"></a><span class="keyword">operator</span><span class="special">-&gt;</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a><span class="special">&lt;</span> <span class="identifier">BidiIter</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <a name="idp115150560-bb"></a><span class="keyword">operator</span><span class="special">++</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>If what.prefix().first != what[0].second and if the element match_prev_avail is not set in flags then sets it. Then behaves as if by calling regex_search(what[0].second, end, what, *pre, flags), with the following variation: in the event that the previous match found was of zero length (what[0].length() == 0) then attempts to find a non-zero length match starting at what[0].second, only if that fails and provided what[0].second != suffix().second does it look for a (possibly zero length) match starting from what[0].second + 1. If no further match is found then sets this equal to the end of sequence iterator. 
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td>
<p>(*this)-&gt;size() == pre-&gt;mark_count() + 1 </p>
<p>(*this)-&gt;empty() == false </p>
<p>(*this)-&gt;prefix().first == An iterator denoting the end point of the previous match found </p>
<p>(*this)-&gt;prefix().last == (**this)[0].first </p>
<p>(*this)-&gt;prefix().matched == (*this)-&gt;prefix().first != (*this)-&gt;prefix().second </p>
<p>(*this)-&gt;suffix().first == (**this)[0].second </p>
<p>(*this)-&gt;suffix().last == end </p>
<p>(*this)-&gt;suffix().matched == (*this)-&gt;suffix().first != (*this)-&gt;suffix().second </p>
<p>(**this)[0].first == The starting iterator for this match. </p>
<p>(**this)[0].second == The ending iterator for this match. </p>
<p>(**this)[0].matched == true if a full match was found, and false if it was a partial match (found as a result of the match_partial flag being set). </p>
<p>(**this)[n].first == For all integers n &lt; (*this)-&gt;size(), the start of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the match, then end. </p>
<p>(**this)[n].second == For all integers n &lt; (*this)-&gt;size(), the end of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the match, then end. </p>
<p>(**this)[n].matched == For all integers n &lt; (*this)-&gt;size(), true if sub-expression n participated in the match, false otherwise. </p>
<p>(*this)-&gt;position() == The distance from the start of the original sequence being iterated, to the start of this match. </p>
</td>
</tr></tbody>
</table></div>
</li>
<li class="listitem"><pre class="literallayout"><a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a><span class="special">&lt;</span> <span class="identifier">BidiIter</span> <span class="special">&gt;</span> <a name="idp115154816-bb"></a><span class="keyword">operator</span><span class="special">++</span><span class="special">(</span><span class="keyword">int</span><span class="special">)</span><span class="special">;</span></pre></li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2007 Eric Niebler<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../BOOST_XPR_ENSURE_.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../xpressive/reference.html#header.boost.xpressive.regex_iterator_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mark_tag.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
